@import 'theme';

.iconfont-mixin(@size) {
  font-size: @size;
  display: inline-block;
  user-select: none;
  transition: all 450ms cubic-bezier(0.23, 1, 0.32, 1) 0ms;
  vertical-align: middle;
  background-image: none;
  font-family: 'icomoon' !important;
  speak: none;
  font-style: normal;
  font-weight: inherit;
  font-variant: normal;
  text-transform: none;
  /* Better Font Rendering =========== */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  &:before {
    line-height: 1;
  }
}

.iconfont-mixin() {
  .iconfont-mixin(@icon-font-size-base);
}

.iconfont-font(@content, @size) {
  .iconfont-mixin(@size);
  &:before {
    content: @content;
  }
}

.iconfont-font(@content) {
  .iconfont-font(@content, @icon-font-size-base)
}

// for iconfont font size
// fix chrome 12px bug, support ie
.iconfont-size-under-12px(@size, @rotate: 0deg) {
  display: inline-block;
  @font-scale: unit(@size / .12rem);
  font-size: .12rem;
  // IE9
  font-size: ~"@{size} \9"; // lesshint duplicateProperty: false
  transform: scale(@font-scale) rotate(@rotate);
  :root & {
    font-size: @font-size-sm; // reset IE9 and above
  }
}
